---
id: server-frontend-api-reference
title: Server Frontend API Reference
sidebar_label: Server API
description: Easily interact with the Temporal Server via Client SDKs or CLI, or use the gRPC and HTTP APIs for Workflow operations. Access code examples and API docs at api-docs.temporal.io.
slug: /self-hosted-guide/server-frontend-api-reference
toc_max_heading_level: 4
keywords:
  - reference
tags:
  - Temporal Service
  - Self-hosting
  - API
---

While it's usually easiest to interact with [Temporal Server](/clusters#temporal-server) via a [Client SDK](/encyclopedia/temporal-sdks#temporal-client) or the [Temporal CLI](https://docs.temporal.io/cli), you can also use its gRPC API.

## gRPC API

Our Client and Worker SDKs use the gRPC API. The API reference is located here:

[`api-docs.temporal.io`](https://api-docs.temporal.io/)

### Use with code

Usually you interact with the API via high-level methods like `client.workflow.start()`. However, Client SDKs also expose the underlying gRPC services. For instance, the TypeScript SDK has:

- WorkflowService: [`Client.connection.workflowService`](https://typescript.temporal.io/api/classes/client.Connection#workflowservice)
- OperatorService: [`Client.connection.operatorService`](https://typescript.temporal.io/api/classes/client.Connection/#operatorservice)
- HealthService: [`Client.connection.healthService`](https://typescript.temporal.io/api/classes/client.Connection/#healthservice)

If you're not using an SDK Client (rare), you can generate gRPC client stubs by:

- Cloning [`temporalio/api`](https://github.com/temporalio/api) (repo with the protobuf files)
- Generating code in [your language](https://grpc.io/docs/languages/)

### Use manually

To query the API manually via command line or a GUI, first:

- If you don't already have a Server to connect to, run [`temporal server start-dev`](/cli/server#start-dev)
- Clone this repo:

```shell
git clone https://github.com/temporalio/api.git
cd api
```

#### With command line

Install [`evans`](https://github.com/ktr0731/evans#installation).

```shell
cd /path/to/api
evans --proto temporal/api/workflowservice/v1/service.proto --port 7233
```

To connect to Temporal Cloud, set the host, cert, cert key, and TLS flag:

```shell
evans --proto temporal/api/workflowservice/v1/service.proto --host devrel.a2dd6.tmprl.cloud --port 7233 --tls --cert /Users/me/certs/temporal.pem --certkey /Users/me/certs/temporal.key
```

Once inside the evans prompt, you can run commands like `help`, `show service` to list available methods, and `call ListWorkflowExecutions`.

#### With a GUI

- Install [BloomRPC](https://github.com/bloomrpc/bloomrpc#installation).
- Open the app
- Select "Import Paths" button on the top-left and enter the path to the cloned repo: `/path/to/api`
- Select the "Import protos" + button and select this file:

```shell
/path/to/api/temporal/api/workflowservice/v1/service.proto
```

- A list of methods should appear in the sidebar. Select one.
- Edit the JSON in the left pane.
- Hit `Cmd/Ctrl-Enter` or click the play button to get a response from the server on the right.

<div className="tdiw">
  <div className="tditw">
    <p className="tdit">ListWorkflowExecutions</p>
  </div>
  <div className="tdiiw" height="1716">
    <img
      className="img_ev3q"
      src="/img/ListWorkflowExecutions.png"
      alt="ListWorkflowExecutions"
    />
  </div>
</div>

One downside compared to [command line](#with-command-line) is it doesn't show enum names, just numbers like `"task_queue_type": 1`.

<div className="tdiw">
  <div className="tditw">
    <p className="tdit">DescribeTaskQueue</p>
  </div>
  <div className="tdiiw" height="1282">
    <img
      className="img_ev3q"
      src="/img/DescribeTaskQueue.png"
      alt="DescribeTaskQueue"
    />
  </div>
</div>

## HTTP API

The Web UI uses [`temporalio/ui-server`](https://github.com/temporalio/ui-server), an HTTP proxy for the gRPC API.

:::caution

As soon as [this HTTP API proposal](https://github.com/temporalio/proposals/pull/79) is implemented, it will be the recommended HTTP API, at which point the `ui-server` API may be discontinued. Further, `ui-server` was designed for use in the UI, and may make breaking changes.

:::

To view the API docs, run [`temporal server start-dev`](/cli#start-dev-server) and open:

[`localhost:8233/openapi/`](http://localhost:8233/openapi/)

To make a request, run:

````sh
$ curl localhost:8233/api/v1/namespaces/default/workflows

{
  "executions": [
    {
      "execution": {
        "workflowId": "workflow-_homozdkzYWLRpX6Rfou5",
        "runId": "c981cb26-baa4-4af8-ac5f-866451d3f83c"
      },
      "type": {
        "name": "example"
      },
      "startTime": ...
    },
    ...
  ],
  "nextPageToken": null
}
```

*/}
````
